<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <title>Document</title>
</head>
<body>
    <!-- 条件渲染 -->
    <div id="ren-3">
        <p v-if='see'>你看不到我</p>
        <!-- v-on添加一个事件监听器 -->
        <button v-on:click='look'>
            切换隐藏/显示
        </button>
    </div>
</body>
<script src="../vue.js"></script>
<script>
    // 条件渲染
    const ren3 = new Vue({
        el:"#ren-3",
        data:{
            see:false
        },
        // 事件监听器
        methods: {
            look: function(){
                    this.see = !this.see
                }
            }
    })
</script>
</html>